﻿using System.Collections.Generic;
using System.Web.Services;
using Logic;

namespace VotanetWebSite.WS
{

    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
   // [System.ComponentModel.ToolboxItem(false)]
    [System.Web.Script.Services.ScriptService]
    public class WSAutocompleteVoter : System.Web.Services.WebService
    {
        [WebMethod]
        public List<string> AutocompleteName(string prefixText)
        {
            return new VoterLogic().AutocompleteByNameLogic(prefixText);
        }

        [WebMethod]
        public List<string> AutocompleteLastName(string prefixText)
        {
            return new VoterLogic().AutocompleteByLastNameLogic(prefixText);
        }


        [WebMethod]
        public List<string> AutocompleteRut(string prefixText)
        {
            return new VoterLogic().AutocompleteByRutLogic(prefixText);
        }


        [WebMethod]
        public List<string> AutocompleteEmail(string prefixText)
        {
            return new VoterLogic().AutocompleteByEmailLogic(prefixText);
        }
    }
}
